<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>axicdma: xaxicdma_example_hybrid_poll.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">axicdma
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xaxicdma__example__hybrid__poll_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xaxicdma_example_hybrid_poll.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file demonstrates how to use xaxicdma driver on the Xilinx AXI CDMA core (AXICDMA) to transfer packets in hybrid transfer mode without interrupt. </p>
<p>There are three transfers: a simple transfer, a sg transfer, and another simple transfer.</p>
<p>The completion of the transfer is checked through polling. Using polling mode can give better performance on an idle system, where the DMA engine is lowly loaded, and the application has nothing else to do. The polling mode can yield better turn-around time for DMA transfers.</p>
<p>Modify NUMBER_OF_BDS_TO_TRANSFER for a different number of BDs to be transferred in the SG transfer.</p>
<p>To see the debug print, you need a uart16550 or uartlite in your system, and please set "-DDEBUG" in your compiler options for the example, also comment out the "#undef DEBUG" in xdebug.h. You need to rebuild your software executable.</p>
<p>Make sure that MEMORY_BASE is defined properly as per the HW system and the transfer length should be cache-line size aligned.</p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.00a jz   07/30/10 First release
2.01a rkv  02/01/11 Modified function prototype of
                       XAxiCdma_HybridPollExample to a function taking only one
               arguments i.e. device id.
2.01a srt  03/06/12 Added V7 DDR Base Address to fix CR 649405.
                       Modified Flushing and Invalidation of Caches to fix CRs
               648103, 648701.
2.02a srt  03/01/13 Updated DDR base address for IPI designs (CR 703656).
4.1   adk  01/07/16 Updated DDR base address for Ultrascale (CR 799532) and
               removed the defines for S6/V6.
4.3   ms   01/22/17 Modified xil_printf statement in main function to
           ensure that "Successfully ran" and "Failed" strings are
           available in all examples. This is a fix for CR-965028.
      ms   04/05/17 Modified Comment lines in functions to
                    recognize it as documentation block for doxygen
                    generation of examples.
4.4   rsp  02/22/18 Support data buffers above 4GB.Use UINTPTR for storing
                       and typecasting buffer address(CR-995116).
4.8   sk   07/10/20 Fix CheckData failure by adding the Cache operations for
                    receive and destination buffers.
4.8      sk   09/30/20 Modify the buffer length to make it cache-line aligned.
4.10  sa   08/12/22 Updated the example to use latest MIG cannoical define
                       i.e XPAR_MIG_0_C0_DDR4_MEMORY_MAP_BASEADDR.
4.11  sa   09/29/22 Fix infinite loops in the examples.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:adf9c32fa950b88ad2bfd9004d07187fc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxicdma__example__hybrid__poll_8c.html#adf9c32fa950b88ad2bfd9004d07187fc">XAxiCdma_HybridPollExample</a> (u16 DeviceId)</td></tr>
<tr class="memdesc:adf9c32fa950b88ad2bfd9004d07187fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">The example to do hybrid transfers through polling.  <a href="#adf9c32fa950b88ad2bfd9004d07187fc">More...</a><br/></td></tr>
<tr class="separator:adf9c32fa950b88ad2bfd9004d07187fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxicdma__example__hybrid__poll_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The entry point for this example.  <a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br/></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The entry point for this example. </p>
<p>It sets up uart16550 if one is available, invokes the example function, and reports the execution status.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if example finishes successfully</li>
<li>XST_FAILURE if example fails.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xaxicdma__example__hybrid__poll_8c.html#adf9c32fa950b88ad2bfd9004d07187fc">XAxiCdma_HybridPollExample()</a>.</p>

</div>
</div>
<a class="anchor" id="adf9c32fa950b88ad2bfd9004d07187fc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XAxiCdma_HybridPollExample </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The example to do hybrid transfers through polling. </p>
<p>The transfer sequence is: a simple polled transfer a scatter gather polled transfer with multiple BDs a simple polled transfer</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DeviceId</td><td>is the Device Id of the XAxiCdma instance</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if example finishes successfully</li>
<li>XST_FAILURE if error occurs</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If the hardware build has problems with interrupt, then this function hangs </dd></dl>

<p>References <a class="el" href="group__axicdma.html#gab746b095007351c2fb2c1a7cf3693f2c">XAxiCdma_CfgInitialize()</a>, <a class="el" href="group__axicdma.html#gabdccf08d74f4e037b06a36a2e9db2877">XAxiCdma_IntrDisable()</a>, <a class="el" href="group__axicdma.html#ga3ecc6331ed89e613e7f1fb53f45a4cb0">XAxiCdma_LookupConfig()</a>, and <a class="el" href="group__axicdma.html#gad2b921e876e581f84be0e7c152d13221">XAXICDMA_XR_IRQ_ALL_MASK</a>.</p>

<p>Referenced by <a class="el" href="xaxicdma__example__hybrid__poll_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
